import request from '@/utils/request'

// 查询投诉建议列表
export function listRepairs(query) {
  return request({
    url: '/waitress/repairs/list',
    method: 'get',
    params: query
  })
}

// 查询投诉建议详细
export function getRepairs(id) {
  return request({
    url: '/waitress/repairs/' + id,
    method: 'get'
  })
}

// 新增投诉建议
export function addRepairs(data) {
  return request({
    url: '/waitress/repairs',
    method: 'post',
    data: data
  })
}

// 修改投诉建议
export function updateRepairs(data) {
  return request({
    url: '/waitress/repairs',
    method: 'put',
    data: data
  })
}

// 删除投诉建议
export function delRepairs(id) {
  return request({
    url: '/waitress/repairs/' + id,
    method: 'delete'
  })
}

// 导出投诉建议
export function exportRepairs(query) {
  return request({
    url: '/waitress/repairs/export',
    method: 'get',
    params: query
  })
}